zf = 'abcevaefegsgdghfdefavbdr'
d = {}
for i in zf:
    d[i] = d.get(i,0) + 1

d1 = sorted(d.items(),key=lambda x:x[1],reverse=True)[:3]
print(d,d1,sep='\n')
